package com.bj.dljd.models.query;

import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class ProductConfigQuery {
    @NotNull(message = "费率不能为空")
    @Size(min = 5, max = 20, message = "产品编码长度在{min}到{max}之间")
    private String productCode;

    @NotNull(message = "支付类型编码不能为空")
    @Size(min = 5, max = 20, message = "支付类型编码长度在{min}到{max}")
    private String wayCode;

    @NotNull(message = "费率不能为空")
    @Size(min = 5, max = 20, message = "类型编码长度在{min}到{max}")
    private String typeCode;

    @NotNull(message = "费率不能为空")
    @DecimalMin(value = "0.01", message = "费率不能小于{value}")
    @DecimalMax(value = "100", message = "费率不能高于{value}")
    private BigDecimal payRate;

    @NotNull(message = "排序不能为空")
    @DecimalMin(value = "1", message = "排序从{value}开始")
    private Integer sorts;
}
